package com.escool.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.escool.dao.NivelesDAO;
import com.escool.model.TbNivel;

@Service
public class NivelesServiceImpl implements NivelesService {
	
	@Autowired
	NivelesDAO nivelesDAO;

	@Transactional
	public void addNiveles(TbNivel nivel) {
		nivelesDAO.addNiveles(nivel);

	}

	@Transactional
	public void updateNiveles(TbNivel nivel) {
		nivelesDAO.updateNiveles(nivel);

	}

	@Transactional
	public List<TbNivel> listNiveles() {
		
		return nivelesDAO.listNiveles();
	}

	@Transactional
	public TbNivel findNiveles(Integer id) {
		
		return nivelesDAO.findNiveles(id);
	}

	@Transactional
	public void deleteNiveles(Integer id) {
		nivelesDAO.deleteNiveles(id);

	}

}
